﻿using Microsoft.EntityFrameworkCore;
using RBAC.Domain.RBAC;
using RBAC.Domain.SmartHealthcare;
using RBAC.Domain.SmartHealthcare.Hosiptial;

namespace RBAC.Interstructrue
{
    public class RBACDbContext : DbContext
    {
        public RBACDbContext(DbContextOptions options) : base(options)
        {
        }

        protected RBACDbContext()
        {
        }
        public DbSet<UserModel> Users { get; set; }
        public DbSet<RoleModel> Roles { get; set; }
        public DbSet<PermissionModel> Permissions { get; set; }
        public DbSet<UserRoleModel> UserRoles { get; set; }
        public DbSet<RolePermissionModel> RolePermissions { get; set; }


        //SmartHealthcare
        public DbSet<BackupRecordModel> BackupRecords { get; set; }
        public DbSet<CaseModel> Cases { get; set; }
        public DbSet<DepartmentModel> Departments { get; set; }
        public DbSet<InpatientSettingModel> InpatientSettings { get; set; }
        public DbSet<OutpatientTemplateModel> OutpatientTemplates { get; set; }
        public DbSet<RegistrationTemplateModel> RegistrationTemplates { get; set; }

        //Hospital
        /// <summary>
        /// 病床
        /// </summary>
        public DbSet<HospitalBedModel> HospitalBeds { get; set; }
        /// <summary>
        /// 病房
        /// </summary>
        public DbSet<HospitalRoomModel> hospitalRooms { get; set; }
        /// <summary>
        /// 住院登记
        /// </summary>
        public DbSet<InpatientRegistryModel> inpatientRegistries { get; set; }
        /// <summary>
        /// 药品信息表
        /// </summary>
        public DbSet<MedicineModel> medicines { get; set; }
        /// <summary>
        /// 患者信息表
        /// </summary>
        public DbSet<PatientListModel> patientLists { get; set; }
        /// <summary>
        /// 住院费用表
        /// </summary>
        public DbSet<PrepaymentModel> prepayments { get; set; }
        /// <summary>
        /// 检药单实体
        /// </summary>
        public DbSet<Prescription> prescriptions { get; set; }
        /// <summary>
        ///  费用明细表  （记录病人住院期间的费用明细（核心中间表））
        /// </summary>
        public DbSet<ExpenseDetail> expenseDetails { get; set; }
        /// <summary>
        /// 住院费用
        /// </summary>
        public DbSet<InpatientFeeModel> inpatientFeeModels { get; set; }
        /// <summary>
        /// 药品明细实体
        /// </summary>
        public DbSet<MedicineItem> medicineItems { get; set; }

        /// <summary>
        /// 支付记录表
        /// </summary>
        public DbSet<PaymentRecordModel> paymentRecords { get; set; }

        /// <summary>
        /// 住院费用记录表
        /// </summary>
        public DbSet<HospitalExpenseModel> hospitalExpenses { get; set; }
    }
}
